import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useLayoutSettingStores = defineStore('setting', () => {
	// 控制左侧菜单是否折叠
	const fold = ref(false)
	// 控制页面是否刷新
	const refresh = ref(false)

	const changeFold = () => (fold.value = !fold.value)

	const updateRefresh = (val: boolean) => (refresh.value = val)

	return {
		fold,
		changeFold,
		refresh,
		updateRefresh
	}
})
